<template>
	<view>
		<view class="listItem"
			v-for="(item,index) in recList"
			:key="index"
		>
			<view class="itemTop spaceBet">
				<view class="jzHead defBg">
					<image class="samePar" :src="defHead" v-if="item.parentHeadImg == ''"></image>
					<image class="samePar" :src="item.parentHeadImg" v-else></image>
				</view>
				<view class="jzInfo">
					<view class="infoItem spaceBet">
						<text>姓名：{{item.parentRealName}}</text>
						<text class="sex">性别：{{item.parentSex}}</text>
					</view>
					<view class="infoItem">身份证号：{{item.parentIdCardNo}}</view>
					<view class="infoItem">生日：{{item.parentBirthday}}</view>
					<view class="infoItem">申请时间：{{item.applyTime}}</view>
				</view>
			</view>
			<view class="itemBot spaceBet" v-if="item.checkStatus == 1">
				<view class="botBtn" @tap="verifyApply(item.applyId,item.parentRealName,3)">拒绝</view>
				<view class="botBtn" @tap="verifyApply(item.applyId,item.parentRealName,2)">同意</view>
			</view>
			<text class="iconfont icon-daishenhe" v-if="item.checkStatus == 1"></text>
			<text class="iconfont icon-yitongguo" v-if="item.checkStatus == 2"></text>
			<text class="iconfont icon-yijujue" v-if="item.checkStatus == 3"></text>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			recList:Array
		},
		methods:{
			verifyApply(applyId,parName,checkStatus){
				this.$emit('verifyApply',applyId,parName,checkStatus);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.listItem{
		margin-bottom: 30rpx;
		position: relative;
		.iconfont{
			font-size: 120rpx;
			position: absolute;
			right: 40rpx;
			top: 50rpx;
			&.icon-yitongguo{
				color: #67d1cf;
			}
			&.icon-yijujue{
				color: $pss-color-red;
			}
			&.icon-daishenhe{
				color:#ffbf1b; 
			}
		}
	}
	.botBtn{
		width: 50%;
		height: 80rpx;
		line-height: 80rpx;
		background: pink;
		text-align: center;
		font-size: 30rpx;
		&:first-child{
			background: #e5f8ff;
			color: $pss-color-blue;
		}
		&:last-child{
			background:#64ccf3;
			color: #323431;
		}
	}
	.itemTop{
		padding:50rpx 20rpx;
		background: #fff;
		.jzHead{
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			flex-shrink: 0;
			margin-right: 20rpx;
			.samePar{
				border-radius: 50%;
			}
		}
		.jzInfo{
			flex: 1;
			.infoItem{
				font-size: 30rpx;
				color: $pss-text-color3;
				margin-bottom: 20rpx;
				&:last-child{
					margin-bottom: 0;
				}
			}
			.sex{
				margin-right: 50rpx;
			}
		}
	}
	
</style>